package cn.jhc;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** 
 *Servlet implementation class RegisterServlet 
 */
@WebServlet("/register.do")
public class RegisterServlet extends HttpServlet { 
	private static final long serialVersionUID = 1L;
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 
		String uname = request.getParameter("username"); 
		String password = request.getParameter("password"); 
		String sex = request.getParameter("sex"); 
		String[] interests = request.getParameterValues("interests"); 
		System.out.println("用户名是：" + uname); 
		System.out.println("密码是：" + password); 
		System.out.println("性别是：" + sex); 
		System.out.print("爱好是："); 
		for(String string : interests){ 
			System.out.print(string + " "); 
		} 
	}
}
